//
//  MLZPlaylistcollecioncell.m
//  MotherLover
//
//  Created by lanou on 15/12/31.
//  Copyright © 2015年 zj. All rights reserved.
//

#import "MLZPlaylistcollecioncell.h"
#define CM 25
@implementation MLZPlaylistcollecioncell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
      //图标
        _imageIco= [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width-CM, frame.size.height-CM)];
        //_imageIco.backgroundColor = [UIColor blackColor];
        [_imageIco.layer setCornerRadius:(frame.size.height-CM)/2];
        _imageIco.layer.masksToBounds = YES;
        [self.contentView addSubview:_imageIco];
    //标题
        _lableTitle = [[UILabel alloc]initWithFrame:CGRectMake(0,_imageIco.bottom , _imageIco.width, CM)];
       // _lableTitle.backgroundColor = [UIColor redColor];
        _lableTitle.textColor = [UIColor grayColor];
        _lableTitle.adjustsFontSizeToFitWidth =YES;
        [self.contentView addSubview:_lableTitle];
    
    
    }

    return self;


}

-(void)setModel:(MLZPlayListmodel *)model{

    [_imageIco sd_setImageWithURL:[NSURL URLWithString:model.icon.url]];
    
    _lableTitle.text = model.name;

    
    

}


@end
